package com.aspose.cells;

import java.util.ArrayList;
import java.util.Collection;

public class ProtectedRange {
   private String b;
   private ArrayList c;
   private String d;
   private int e;
   private ProtectedRangeCollection f;
   private String g;
   byte[] a;

   ProtectedRange(ProtectedRangeCollection ranges) {
      this.f = ranges;
      this.c = new ArrayList();
   }

   ProtectedRange(ProtectedRangeCollection ranges, String name, CellArea cellArea) {
      this.f = ranges;
      this.b = name;
      this.c = new ArrayList();
      com.aspose.cells.b.a.a.ze.a(this.c, (Object)cellArea);
   }

   ProtectedRange(ProtectedRangeCollection ranges, String name, ArrayList cellAreaList) {
      this.f = ranges;
      this.b = name;
      this.c = new ArrayList();
      com.aspose.cells.b.a.a.ze.a(this.c, (Collection)cellAreaList);
   }

   void a(ProtectedRange var1) {
      this.b = var1.b;
      this.d = var1.d;
      this.e = var1.e;
      this.g = var1.g;

      for(int var2 = 0; var2 < var1.c.size(); ++var2) {
         CellArea var3 = (CellArea)var1.c.get(var2);
         CellArea var4 = new CellArea();
         var4.StartRow = var3.StartRow;
         var4.StartColumn = var3.StartColumn;
         var4.EndRow = var3.EndRow;
         var4.EndColumn = var3.EndColumn;
         com.aspose.cells.b.a.a.ze.a(this.c, (Object)var4);
      }

   }

   public String getName() {
      return this.b;
   }

   public void setName(String value) {
      this.b = value;
   }

   public CellArea getCellArea() {
      return (CellArea)this.c.get(0);
   }

   public CellArea[] getAreas() {
      CellArea[] var1 = new CellArea[this.c.size()];
      com.aspose.cells.b.a.a.ze.a(this.c, (Object[])var1);
      return var1;
   }

   ArrayList a() {
      return this.c;
   }

   public void addArea(int startRow, int startColumn, int endRow, int endColumn) {
      CellArea var5 = new CellArea();
      var5.StartRow = startRow;
      var5.StartColumn = startColumn;
      var5.EndRow = endRow;
      var5.EndColumn = endColumn;
      com.aspose.cells.b.a.a.ze.a(this.c, (Object)var5);
   }

   void a(CellArea var1) {
      com.aspose.cells.b.a.a.ze.a(this.c, (Object)var1);
   }

   public String getPassword() {
      return this.d;
   }

   public void setPassword(String value) {
      this.d = value;
      if (value != null && !"".equals(value)) {
         this.e = zsw.a(value);
      } else {
         this.e = 0;
      }

   }

   int b() {
      return this.e;
   }

   void a(int var1) {
      this.e = var1;
   }

   public String getSecurityDescriptor() {
      return this.g;
   }

   public void setSecurityDescriptor(String value) {
      this.g = value;
   }
}
